package city.spring.modules.medicine.service;

import city.spring.modules.medicine.entity.MedicineInventorywarehouseEntity;
import city.spring.modules.medicine.vo.MedicineInventorywarehouseVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import lombok.NonNull;
import org.apache.ibatis.annotations.Param;

import java.security.Principal;
import java.util.List;

/**
 * Service：药品盘点入库
 *
 * @author 谢金婷
 * @date 2020-07-16 14:12:55
 */
public interface MedicineInventorywarehouseService extends IService<MedicineInventorywarehouseEntity> {
    String CACHE_NAME = "medicine_inventorywarehouse";

    /**
     * 业务处理：保存一个 <strong>药品盘点入库</strong>
     *
     * @param entity 药品盘点入库
     */
    void saveMedicineInventorywarehouse(MedicineInventorywarehouseEntity entity, @NonNull Principal user);

    /**
     * 业务处理：修改一个 <strong>药品盘点入库</strong>
     *
     * @param entity 药品盘点入库
     */
    void updateMedicineInventorywarehouse(MedicineInventorywarehouseEntity entity);

    /**
     * 业务处理：删除一个 <strong>药品盘点入库</strong>
     *
     * @param primaryKey 主键ID
     */
    void deleteMedicineInventorywarehouse(String primaryKey);

    /**
     * 业务处理：删除多个 <strong>药品盘点入库</strong>
     *
     * @param primaryKeys 主键ID列表
     */
    void deleteMedicineInventorywarehouse(List<String> primaryKeys);

    /**
     * 根据id获取药品盘点入库信息
     *
     * @param id
     * @return
     */
    MedicineInventorywarehouseEntity getById(String id);

    IPage<MedicineInventorywarehouseVO> listPage(Page<? extends MedicineInventorywarehouseEntity> page, @Param(Constants.WRAPPER) Wrapper<? extends MedicineInventorywarehouseEntity> wrapper);

}